home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / tool_inc.zip / ITOA.INC < prev    next >
Text File  |  1989-06-02  |  719b  |  33 lines

  1.  
  2. (*
  3.  * Copyright 1987, 1989 Samuel H. Smith;  All rights reserved
  4.  *
  5.  * This is a component of the ProDoor System.
  6.  * Do not distribute modified versions without my permission.
  7.  * Do not remove or alter this notice or any other copyright notice.
  8.  * If you use this in your own program you must distribute source code.
  9.  * Do not use any of this in a commercial product.
  10.  *
  11.  *)
  12.  
  13. (*
  14.  * return the string equivelant of an integer value
  15.  * with leading zeroes for a minimum width of 2
  16.  *
  17.  *)
  18.  
  19. function itoa (int:           integer): anystring;
  20. var
  21.    tstr:          anystring;
  22.  
  23. begin
  24.    str(int, tstr);
  25.  
  26.    if length (tstr)= 1 then
  27.       itoa := '0' + tstr
  28.    else
  29.       itoa := tstr;
  30. end;
  31.  
  32.  
  33.